Index: bakery.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bakery/bakery.module,v
retrieving revision 1.52.4.4
diff -u -p -r1.52.4.4 bakery.module
--- bakery.module	28 Oct 2010 00:27:51 -0000	1.52.4.4
+++ bakery.module	28 Oct 2010 22:54:44 -0000
@@ -739,6 +739,7 @@ function _bakery_taste_chocolatechip_coo
 
   // Valid cookie
   if ($cookie) {
+    $destroy_cookie = FALSE;
     global $user;
 
     // Bake a fresh cookie. Yum.
@@ -1256,7 +1257,7 @@ function bakery_user_logout() {
 
   // We want to redirect the user to his original destination.
   $get = $_GET;
-  $destination = $get['q'];
+  $destination = !empty($get['q']) ? $get['q'] : '';
   unset($get['q']);
   // We append a GET parameter so that the browser reloads the
   // page.
