I want to only allow users with IE8 (not IE6, IE7) or another browser to access my site when logged in.
I followed: http://code.google.com/p/ie6-upgrade-warning/ But
Depends on how you've coded your (X)HTML, but IE8 should use standards mode (not IE7 mode) if you have a strict doctype like:
at the top of your HTML files.
XHTML 1.0 Specs - Strictly Conforming Documents
Here's a good post about how different doctypes/etc affect IE8's rendering mode: Understanding Compatibility Modes in Internet Explorer 8