diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc
index 02870e9..b50bedd 100644
--- a/modules/user/user.pages.inc
+++ b/modules/user/user.pages.inc
@@ -171,9 +171,22 @@ function user_logout() {
 
   module_invoke_all('user_logout', $user);
 
-  // Destroy the current session, and reset $user to the anonymous user.
+  // Obtain the current session's attributes.
+  $params = session_get_cookie_params();
+
+  // Destroy the current session.
   session_destroy();
 
+  // Re-create the current session cookie.
+  session_set_cookie_params($params['lifetime'], $params['path'], $params['domain'], $params['secure'], $params['httponly']);
+
+  // Start a new session.
+  session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy_sid', 'sess_gc');
+  session_start();
+
+  // Load the anonymous user using the new session.
+  $user = drupal_anonymous_user(session_id());
+
   drupal_goto();
 }
 
