updated to support modifying headers for initial rest request instead of explicitly asking for a bearer token, this adds flexibility to set any headers necessary