Add maintenance mode

This takes care of #579 

It adds the redis "maintenance" key as in american gut, as well as click commands to set and unset the maintenance mode. It also auto-sets maintenance mode if login screws up because the database is down.
Yeah, I can add that