add a callback hook that is invoked upon disconnection from the server