Auth

several cleanups for auth plugins