Refactoring Account model and tests for login