Determining base url at client side