Added more test coverage for login retry logic.