How to add a class to the body element?

-Your BREAD-CRUMB’S- ID is → comp-kd49gw7q3 ???
-Your BREAD-CRUMB is placed in the HEADER ???

Not sure, but maybe you also should make sure to await for “loggedIn” result first…

$w.onReady(async function () {
  const loggedIn = await authentication.loggedIn();
  console.log("Logged-In: "; loggedIn);
  //...
  //...
  //...
  console.log("Bread-Crumb: ", $w('#comp-kd49gw7q3'));
  //...

Always inspect your own code, by adding enough of console-logs, in all the code-lines, where to face some problems.

Normaly it should work.