updated to add login and register feature in we.js