working sign out functionality