Tweak authenticate.php to use mysql