check cookies before checking server