Hey 👋 As you mentioned, above SSR example repo should let you do it.
But to be honest, SSR is very very complex and doesn't give as much benefits.
What you can do is have 3 states: null | false | true.
If null, show skeleton loaders (or hide fully)
If false, show button X
If true, show button Y
By default you set it to null, and after 1-2s it switches to proper boolean.
Such UI can be seen in many big providers such as DigitalOcean, Railway, or even Facebook. It is much faster solution and user doesn't usually care too much. In the end, those authentication requests are usually very optimized, and in Appwrite they can resolve within <0.1s.
Here is quick showcase of how such client-side-rendered UI looks in Railway: