Working auth with logout