login() returns a promise and throws error if user object is not passed in
added two new tests to login() function
added a test that makes a fake HTTP request to /auth/login