Adding basic auth basics.

This adds in optional auth - we can check for the authorized cookie in the templates now and either display the login button or the user stuff. It is a we bit ergly tho - I moved stuff into the registration of the auth plugin.