added support for bearer tokens