Official comment
We have added a new display condition for blocks that will display to "Everyone except logged in members". Add a button to the block that links to the login page. Only people who are not logged in will see it.
You can create a companion button in a block below it that will display only to logged in members, and use a log out button as described below.
.
The display conditions are in the block editor > Settings > Display settings: