Adding logout functionality for different use cases