diff --git a/www/tbauth.php3 b/www/tbauth.php3
index 7e0185bbf694a61ea3b797e6e6c219c0bd6157c6..ffb0036c61507fdf34a8149993c47982a68988d6 100644
--- a/www/tbauth.php3
+++ b/www/tbauth.php3
@@ -686,6 +686,17 @@ function DOLOGIN($token, $password, $adminmode = 0) {
 	$timeout = $now + (60 * 60 * 24 * 32);
 	setcookie($TBNAMECOOKIE, $uid, $timeout, "/", $TBAUTHDOMAIN, 0);
 
+	#
+	# Clear the existing Wiki cookie so that there is not an old one
+	# for a different user, sitting in the brower. 
+	# 
+	if ($WIKISUPPORT) {
+	    $flushtime = time() - 1000000;
+	    
+	    setcookie($WIKICOOKIENAME, "", $flushtime, "/",
+		      $TBAUTHDOMAIN, $TBSECURECOOKIES);
+	}
+	
 	#
 	# Set adminoff on new logins, unless user requested to be
 	# logged in as admin (and is an admin of course!). This is