Add handler for disconnect