login rerouting and stuff