Minimizing logic in Auth Filter