Linked up the message functionality in the backend