Changes to index.php for challenge-response authentication