adjusted the redirect after sign to root unless redirect back