add socket disconnection handlers