Added check for CORS errors, and display warning message