Minor bugfix to user factory
Add tests for UsersController#login
Implement UsersController#login