Tryharding login tests, refactors