Added the ability to hook into on_disconnect