clean up the code: server.js, authCheck.js and secureAPI.js