Increase test coverage: Add unit tests to the login module part 2