fix redirect loop after failed login in openid