Add onConnect/Disconnect events