Implement simple logout function