Move authenticate_user out of junk.php