login.js file all optimization.