[eluser]skunkbad[/eluser]
The way I do it is probably close to the way other people are doing it.
When the user logs in, there is at least one query to the database, and some of that data gets put into a cookie, but is also loaded as a variable. Since cookie data is not available on the same request as it was set, you need that variable. I create the variable using $this->load->vars() in MY_Controller.
In the main template, I can just check if that variable exists, and if it does/doesn't, then I know to offer the login/logout option.
Note, this variable is not used for authentication. At least for me, authentication is in a secure cookie, and the user needs to know if they are logged in on pages that are not HTTPS. That's the reason for the second (non secure) cookie.