Added X509 auth support and test case