Logout logic.
Merge pull request #7 from pedroigor/master

Logout logic.