angular chatroom factory for web socket integration, and controller