updating login.js and index.js

Todo sections completed using nodejs. And verified in dev region (ubuntu
VM).