fix redirect on logging failed