added a more fine grained control on authentication