For ThemeBuilder version 5.5.0+ / Confluence 5.9.7+ the flaglogic method has been changed. Please see the 'main' panel for the logic that controls which sidebar panel to show.
It uses the flag macro to set or change a value that can then be used by other macros like ‘panel-show/hide’.
The set-flag macro creates the ‘login’ flag and gives it a default value of false.
panel-show can use the Confluence decorator value of login to only show its contained code on that condition.
The set-flag macro is now used to set the login flag to true.
The ‘panel-import’ macro will use the parameter ‘flag = login’ to show the ‘login’ panel, which contains content limited to the login/logout pages.