refactor category, subcategories, products controller(add before_action filter)