fixing redirect on login