changed user checking

checks the user cookie, if there is none then no one is logged in so
send them back to home page to log in/register.
in topics.js it checks if the current user is a guest or a registered
user and sets the variable accordingly