Converting to socket.io in stead of $http