log out function and more header stuff