CA Cert Bugfix when detecting authentication

It looks like I left a bug in the pull request after some troubleshooting yesterday; I'm just not used to auto updating pull requests.  Will push experimental changes to a branch from now on.

Thanks so much for merging my work upstream and the really clean CAS implementation to work with.