added CORS support, and some debugging

This enables CORS so the webapp on port 80 can call the services on port 8080.  Hopefully I did this right. I've done almost no Python before.