added message event listener to the ui, messages can now be sent from the ui