fix incorrect implementation of auth filter.