--- loggedin.php.orig	2005-11-21 11:31:14.000000000 +0100
+++ loggedin.php	2005-11-21 11:32:36.000000000 +0100
@@ -42,7 +42,7 @@
 
 				$_SESSION['_config']['oldlocation'] .= "$key=$val";
  			}
-			$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
+			$_SESSION['_config']['oldlocation'] = $_SERVER[SCRIPT_NAME]."?".$_SESSION['_config']['oldlocation'];
 
 			header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=4");
 			exit;
@@ -100,7 +100,7 @@
 
 			$_SESSION['_config']['oldlocation'] .= "$key=$val";
 		}
-		$_SESSION['_config']['oldlocation'] = "account.php?".$_SESSION['_config']['oldlocation'];
+		$_SESSION['_config']['oldlocation'] = $_SERVER[SCRIPT_NAME]."?".$_SESSION['_config']['oldlocation'];
 
 		header("location: https://".$_SERVER['HTTP_HOST']."/index.php?id=4");
 		exit;
