working on bearer token generation