update on user logout and edit