set up the login/logout code
put the login form in the header and set it up so logged in users see a link to their user page
include the login code in this page