Node.js chat with database storage and user authentication