Allow custom API endpoint

My site's setup on `{url}/rest` instead of `{url}/drupalgap` for some reasons. Allow custom API endpoint if specified, default to `drupalgap`