Updated validateLogin.php to use the database functions.