redirecting to auth page instead of authorizing after registration