Removed unnecessary cookie setting logic