[api] add api to return events in json foramt
[api] add api to get avatar
add api to get unread messages count