everything up to login/logout