refactored webapp middleware
socket.io now plays nicely with custom mount point