Changed sign out logic.