Added a check to prevent infinite loop if cookies are disabled