Login logic is now all in the services.js file

refactored the services.js file so that our code is DRY.