Updated server.js to use init-vars and switched profiles api from 'mac' to 'id'