Login and more tests

Shored up some of the unit tests