Moved the check for PeerCertificates outside of the function, to allow for more auth methods.
Renamed tests for better readability.