Added function MarkAsRead for mark the unread messages as read