Separate code to do tls and non-tls authentication. Introduce AuthTLSException to make error handling easier.
Separate code to do tls and non-tls authentication. Introduce AuthTLSException to make error handling easier.