Added isLoggedIn method

method checks if session username var is set instead of manually writing
it out over and over