Change header style when users sign in
Look at the body tag of your theme. Some themes add classes to it indicating whether or not you are logged in.  If yours does, then you can do this via css by:

.logged-in #header
{
   background-color: #fff;
}

.not-logged-in #header
{
   background-color: #000;
}


If you don't have a body class that indicates logged in status, then you modify your page.tpl as user4035 suggested. There is no is_user_logged_in function.  Instead, it's 

&lt;?php
global $user;

if ( $user-&gt;uid ) {
  // Logged in user
}
else {
  // Not logged in
}
?&gt;


Code Source - https://drupal.org/node/92218#comment-167984