fix not going to login if not logged in