fix bug in login.js