Fix Urls to use location.origin vs hardcoded