moved base url into common var for js