Fix intermittent test failures with login modal