redirect users to the right page after login or signup