Update loginFunctions.js