moved login code from user.js to login.js