Node.js: Loading bar re-implemented in client