fixed user login authentication
refactored front end user actions into a service