Google documents there gapi.auth.signOut() method here: https://developers.google.com/+/web/signin/#sign-out
The catch is that it says you can only call
The button just has to be in the DOM, it doesn't have to be showing. What seems to work well is:
Then you'll get a callback every time, but only show the button when signed out.