Node.js: Client cleanup