allow cross origin in json requests and remove frontend stuff from backend