Shifted jQuery trigger for login, save and load to main.js
Integrated two ways of authentication, save and load procedures