fixed login and added functionality for adding a user