added put method and corresponding refresh method in login.js

put method added. refresh method called to refresh the name and email
and create a new session id
added put and refresh method

put method in index.js added and refresh method added to login.js to
refresh the name and email and create a new session id