You can store the returned token since you’ll need it for most of the endpoints of the API.
Note that the register function is exactly the same as the login.
Same function signature and returns a token, you may test it:
// const res = await bkn.login("a@b.com", "pass1234");
const res = await bkn.register("new-user@domain.com", "passwd123");