socket.io setup with angularjs factory updated