More work on X509 auth