Remove some unused stuff, and implement logout.