some redirect logic of login