I would prefer a method, which does not need a async call to the server, to save resources.
Once you are logged in your system will set a cookie with the session id. you may also set a cookie with through your backend, which can be used to determine wether a customer is logged in or not.
//using php here
setcookie('customer',1); //customer is logged in
setcookie('customer',0); //customer is not logged in
on your frontend you may use jquery/javascript to check for that status. I am assuming here you have the jquery cookie plugin included https://github.com/carhartl/jquery-cookie
if ( $.cookie('customer') === 1 ){
$('#webviewbtn').show(); //show logout button
}
else{
$('#webviewbtn').hide(); //no logout button needed
}
in that szenario it is really important, that the 'customer' cookie has the same domain AND the same duration as the session cookie. Otherwise returning customers may have the customer cookie still set to 1 but the session cookie is already out of date. Also all actions called from the customer need to be verified in the backend, to verify that the state customer === 1 is still valid there. Otherwise you have a big security issue, since everybody can set that cookie to 1 :)