changed how the server url gets built in setServerURL to account for a few different formats