Refactor with User model and "connect" middleware based on Magento events