diff --git a/lib/session.php b/lib/session.php
index 135d299341a228a958c1f07ac8eaca9403e53fb6..55758432f0e8807012724d58d72ff6b8e22cdf34 100644
--- a/lib/session.php
+++ b/lib/session.php
@@ -41,7 +41,7 @@ private $datahash='';		// hash of data field
 		$token = $this->genSessionID(); 
 		$DB->Execute("insert into {$this->table} (hash, lastseen, ip) values (?,NOW(),?)", array($token, $_SERVER['REMOTE_ADDR']));
 		setcookie("sucssite_session", $token, NULL, "/", $preferred_hostname);
-		setcookie("sucssite_loggedin", "false");
+		setcookie("sucssite_loggedin", "false", time());
 		$this->token = $token;
 		return;
 	}
@@ -319,7 +319,7 @@ private $datahash='';		// hash of data field
 
 		// set a cookie as a hint that we're logged in
 		// this can be checked for to allow redirecting to SSL to get the secure cookie
-		setcookie("sucssite_loggedin", "true", time() + $this->max_session_length * 60);
+		setcookie("sucssite_loggedin", "true", time() + $this->max_session_length * 60, "/");
 
 		// Update the session, filling in the blanks
 		$DB->Execute("update {$this->table} set hash=?, username=?, logintime='NOW()', lastseen='NOW()', ip=? where hash=?",