updating messagesmodel to use userid when sending message.