added some handling to sign out