diff --git a/inc/auth.php b/inc/auth.php
index f9d48d0d6bd2d6daae0a9dddc8d0e2dbdd036c95..19c7fb174b04ba6c7a4ce72e2218fa7142994c19 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -281,6 +281,9 @@ function auth_logoff(){
   global $INFO, $ID;
   global $auth;
 
+  // reopen session
+  @session_start();
+
   if(isset($_SESSION[DOKU_COOKIE]['auth']['user']))
     unset($_SESSION[DOKU_COOKIE]['auth']['user']);
   if(isset($_SESSION[DOKU_COOKIE]['auth']['pass']))
@@ -300,6 +303,9 @@ function auth_logoff(){
   if($auth && $auth->canDo('logoff')){
     $auth->logOff();
   }
+
+  // close session again
+  session_write_close();
 }
 
 /**