Refactor unit tests using DRY, add tests for api login
Merge pull request #652 from rationalrevolt/master

Refactor unit tests using DRY, add tests for api login