(bug) Fix infinite redirect after login