Added message input functionality