Improve redirect after login