authenticate.php now returns a JSON object containing the username