Added authentication hook
Working on new where evaluation