update callback function for logout