add logout
refactor naming