In order to use this function effectively, you need to suppress functions you don't want all users to use until the user is logged in. Use the following in the <head> section:
<#notloggedin>
<meta http-equiv="Refresh" content="5">
<#/notloggedin>
to force the sidebar to refresh every 5 seconds when the user is not logged in. Then, mark the part of the sidebar that you don't want to give access to all users with:
<#loggedin>
Restricted Content
<#/loggedin>
If you place all icons but the Logoff icon in the <#loggedin> section, the if you're not logged in you will only see the Logoff icon.
For the user/team specific sidebar.html, you want the logoff button to change the sidebar back, so you'll need to add the following Javascript function:
<script language=JavaScript>
<!--
function setlocation() {
var t=setTimeout("document.location='wceweb.dll?function=template'",1000);
}
-->
</script>
and then change the logoff function from:
onClick="javascript:if (savemsg()) {top.frames['mainview'].document.location='wceweb.dll?logoff=true';}">
to
onClick="javascript:if (savemsg()) {top.frames['mainview'].document.location='wceweb.dll?logoff=true';setlocation();}">