Refactor logout function