make sure the action of the login form, uses the following code:
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".htmlspecialchars($_SERVER["QUERY_STRING"]):""; ?>"
if you continue to have problems, send a copy of the login page in a zip archive please.