Fixed flow to redirect after successful login