improved app ws url generation