Fixed login.php so it works with the new DB structure