Add code to handle the redirect after login