added a logout function closes #65