a bunch of changes to the authhandlers laying the foundation for better caps handling