Update main.js to err with 403 instead of JSON