Do the check in handle instead of the two callers. This also reduces the uses of handle::get_base_url