How to hide login button server-side? (once logged in)

This should help you achieve what you want.
The Server Side Server Action could return the security identity instead of a server connect.