Add an InvalidAuthFunc

This allows users of the tls package to set
a function to call on invalid authorization
attempts, such as a logging function.