Change auth

Don't merge yet; this is just an experimental idea of how to do authentication. 
Also, I think we should have a default, anonymous user, which has a certain default set of permissions, rather than having user=None in every function. I think eventually I'll move user out from a function argument into a sort of global variable.