added redirect after login functionality