fixes redirect on login