Add missing login, and complete test suite