How to create a 'leave site' button?

A post was split to a new topic: How do I create a “leave site” button?