Update authenticate.js