If you put a microflow behind the navigation item and only allow the anonymous user on this, then I shouldnt be shown to other users.
Yes everyone can see the button when they enter the application (they will have user role anonymous at that point). When they login they will have another user role (e.g. User) and they will no longer see this button.
I think however, that the standard ‘sign in’ button also provides this functionality.
If you have a Anonymous user role, you have also a custom login page. Is that correct?
In that case you can change the properties of the custom login page.
Navigation > Visible for: Only Anonymous
Success!