Replaced sign-out logic