Linked user to login and added more functionality to user.js