added auth header logic