Add logout command

Here is a PR to add a logout command.