hasComponent loadedOnly option

We've faced a quite awkward problem in connection with <code>allowAutoLogin</code>. Every time it comes to restore from cookie we get the <code>Undefined property: CWebApplication::$user</code> PHP notice which breaks the site.

IMO it's all about the user component loading too slow (btw we overrode the <code>CWebUser</code>). I tried to use <code>Yii::app()->hasComponent('user')</code> but it didn't help beacuse the component itself exists and there is no way to check whether the component's got loaded or not. If I'm not mistaken the loaded ones are  in the <code>$_components</code> array so I extended a little bit the <code>hasComponent()</code> function.