added error messaging when same-origin policy is on