Fixed wrong references to static assets in login module
Refactored socket.io code in the stream module