Updates schemes to reflect JSON
Correct post response processing
Refines the CORS communication with iframe
Adds cors origin checks