Changes to sim.js for challenge-response authentication