better login/signup/signout logic