pulled small changes from yii2-usr