added server side saving of messages