Tidy up user code and allow editing of profiles.

Users can now edit their profiles (just their name right now) by clicking on
their name in the top-right corner.

Also a bit of tidying up of CSS, forms, etc.