add an on_disconnect callback