Get auth header from sess
Refactored curl