added support for authenticated download