added authentication support in pdfexport (re #899, re #968)