Added listeners for MQTT connect and disconnect events