Update login.js

Implemented all "TO DO" sections