As I think about your question I get the idea that you would probably like to do more than just hide a button. Maybe not as of yet but probably in the future more things will pop up, things of which you would like to style based on the user profile.
Therefore I suggest you could create (at least) two different stylesheets.
Based on the answers given already you can add this code on top of your page where you want to present this difference between the user profiles.
#if ($xcontext.user == 'XWiki.XWikiGuest')
#set($discard = $xwiki.ssx.use("XWiki.guestStyles.WebHome"))
#else
#set($discard = $xwiki.ssx.use("XWiki.userStyles.WebHome"))
#end
For the rest it would be easy to control how the page would look like for guests and for logged in users.
CSS for guests (XWiki.guestStyles):
.button-to-hide {
display: hidden;
}
CSS for logged in users (XWiki.userStyles):
.button-to-hide {
display: block;
}
This is ofcourse a gist, details are up to you. I think you would make your life much easier when you work this way.
Anyway, good luck and happy developing!
JP