add callback for logout function