Add support for sending messages with Ajax