Login on Social theme

Can you help me understand how to create a simple login form in the header (like here on this WPMU dev forum)

Only to be displayed if the user is not logged in

Thanks in advance