Improved login unit test.