Added some logic to AuthnFilter.