Added logout functionality. Closes #28.