update resource handling; add service metrics resource; update baseuri when behind a proxy