protected static function _authSuccess(CmsAuthRecord $record)
    {
        //zapis poprawnego logowania do rekordu
        $record->lastIp = \Mmi\App\FrontController::getInstance()->getEnvironment()->remoteAddress;
        $record->lastLog = date('Y-m-d H:i:s');
        $record->save();
        \Mmi\App\FrontController::getInstance()->getLogger()->info('Logged in: ' . $record->username);
        //nowy obiekt autoryzacji
        $authRecord = new \Mmi\Security\AuthRecord;
        //ustawianie pól rekordu
        $authRecord->id = $record->id;
        $authRecord->name = $record->name;
        $authRecord->username = $record->username;
        $authRecord->email = $record->email;
        $authRecord->lang = $record->lang;
        $authRecord->roles = count($record->getRoles()) ? $record->getRoles() : ['guest'];
        return $authRecord;
    }