Support for authen, authz, stacked handlers and various other bits and pieces

Here's some additions I needed to make my application run...