change message dispatching to rails server + user avatar in chat feature