added usePortInLinks arg to appUrl.constructUrl()