add client connection reconnected and error event handler