Moving login.js to scripts