fixes routing bugs at login