fix redirect loop in email confirmation