Fixed logic with checking for admin route