Redirect user to previously requested URL after login
Simplified code