Initial implementation of friend chat
Minor fixes in js and message model