Improve ApiLogin test coverage