Now uses a cookie to store the profile flag, not a session