Replace before filter with before action