dynamic protocol for baseurl
closes #47