hook in logout