Combine logic in app.js and use MongoDB for storing user accounts.