I think you can use jquery for that. Something like this:
Jquery:
if($('.qa-logged-in').length)
{
$('body').addClass('logged');
}
or
$('body').has('.qa-logged-in').addClass('logged');
Css:
.YourSidebar,
.YourFooter,
.YourHeader{display:none;}
.logged .YourSidebar,
.logged .YourFooter,
.logged .YourHeader{display:block;}