ajax for send and recv messages ^_^ and fix bugs

have some TODOs in browser-side mesg.js

not handle `err`s in server-side mesg.js (because
I don't know how to handle it)