new server.js to handle authentication