reverted login.js to solve "reload" issue