Fix support for bearer tokens