Improve tests to not assume BASE_URL is localhost, and remove couple of warnings.