conditionally add bearer token