You can log out of the CLI from either the User Exec and Privileged Exec modes by entering the exit command. For example:
host1>exit logging out.
or
host1#exit logging out.