More revisions to index.php for challenge-response authentication