I would suggest altering the code I have provided. You can try something like this:
**UNTESTED
if (customer_id != "Guest") {
// This assumes you're buttons are inside of a movie clip.
Your_Buttons_MC.gotoAndStop(2);
} else {
// This assumes you're buttons are inside of a movie clip.
Your_Buttons_MC.gotoAndStop(1);
}
As the customer's first name is passed if they are logged in, an easy way to validate the session as a member/guest session would be to check the value of that variable. If the person is not logged in, the customer_id will return "Guest". Therefore, if the value is "Guest" show the log in button. If it is not, show the log out button.
HTH,
-Chris