updated redirecting if user loged in