Added redirect after login and successful register