corrected some bugs in login.php