How do I log user out on macos 10.15

Actually it was right there in comments under the article

users
id {usernametobootout}
sudo launchctl bootout user/{useridtobootout}