Fixed premature emission of data using socket.io

-Installed FuturesJS to handle control-flow
-Data from db is now retrieved before it is emitted by socket.io