protected function registerAssets() {
		$cs = Yii::app()->clientScript;
		$cs->registerCoreScript('jquery');

		$assets_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
		$url = Yii::app()->assetManager->publish($assets_path, false, -1, Yii::app()->assetManager->linkAssets?false:YII_DEBUG);
		if ($this->cssFile) $cs->registerCssFile($url . '/css/auth.css');

		// Open the authorization dilalog in popup window.
		if ($this->popup) {
			$cs->registerScriptFile($url . '/js/auth.js', CClientScript::POS_END);
			$js = '';
			foreach ($this->services as $name => $service) {
				$args = $service->jsArguments;
				$args['id'] = $service->id;
				$js .= '$(".auth-service.' . $service->id . ' a").eauth(' . json_encode($args) . ');' . "\n";
			}
			$cs->registerScript('eauth-services', $js, CClientScript::POS_READY);
		}
	}