web ui accepts api_url with trailing slash

fixes #588 

i've made behaviour here consistent with base_url in that the initializer enforces a trailing slash on @api_url, and the javascript that consumes it now doesn't add a slash.