user is redirected back to previous page upon login or sign up