Fix plugins' attachments. Add before filters to controllers (tenant and plugin)