updating chat demo to support long-lived modules