title: Where do i override authentication method in yii?
body: <p>I need to override both authentication (for when user's trying to logging in) and also the function is being used to check if the user is logged in in the header of the application (the function that check the sessions and cookie to check if the user is logged in) but i don't know where are these methods? and also i don't know how to find where are these methods! </p>
  
  <p>** The reason of ovveride is to also check a Flag, if the flag is FLASE don't authenticate the user, or even if the user is also authenticated on page change (header reload) log-out the user if the flag changed to FLASE**</p>
  
  <p>It would be appreciated if you also helping me to find adequate references that can help me in similar situations beside yii/wiki and google i tried them :)</p>
  
  <p>Regards,</p>