Added js files for admin and login function.
Refactor code in login function and change the login algorithm.