In a gala ceremony on the White House lawn yesterday, President Clinton signed health care legislation he said would "seal the cracks" that have allowed insurance companies to deny coverage to Americans who get sick or lose their jobs.

The bipartisan Health Insurance Portability and Accountability Act of 1996 makes it easier for workers to carry their health insurance from job to job and strictly limits the ability of insurance companies to deny coverage to Americans with preexisting conditions.

Clinton called it a "long step toward the kind of health care reform our nation needs" and told first lady Hillary Rodham Clinton, sitting in the front row with former surgeon general C. Everett Koop, that it "justifies all those days on the road and all those nights you stayed up reading the incomprehensibly complex issues of health care."

Hillary Clinton had been in charge of the administration's comprehensive health care overhaul effort that failed two years ago.

The president mentioned nothing in his address about universal health care, which was a goal of his original plan. And although the bill he signed yesterday does little for the 40 million Americans who have no health care coverage, Clinton said it was a "profoundly important piece of legislation" because it could help up to 25 million Americans who feared losing their insurance if they got sick or changed jobs.

In a preemptive morning news conference, Republican National Committee Chairman Haley Barbour complained that Clinton was trying to "take credit for yet another accomplishment of the common-sense Republican Congress."

And befitting the political campaign season, Republicans and Democrats jockeyed for credit almost provision by provision.

Sen. Edward M. Kennedy (D-Mass.), author of the legislation with Sen. Nancy Landon Kassebaum (R-Kan.), praised the president for giving the bill "irresistible momentum" in his brief call for action in his State of the Union Address last January.

Kassebaum praised Republican presidential nominee Robert J. Dole for adding provisions to make long-term health insurance tax-deductible and increasing the health care deductions for the self-employed.

Referring to the rejected Clinton plan, Dole issued a statement saying "the American people know that President Clinton's advocacy of an overdose of government control on health care was presidential malpractice. They should exercise their right to a second opinion on election day."

But just as Republicans blame Clinton for blocking passage of the health insurance legislation while he was holding out for universal coverage, Democrats said that when Dole was majority leader he held up the bill for months.

For the second consecutive day, Clinton took full advantage of all the White House offers, including the Marine Band and an invited, appreciative audience, to sign popular legislation. He signed a measure raising the minimum wage Tuesday and is scheduled to sign a historic welfare bill today.

The ceremonious bill signings have been planned to highlight Clinton's legislative record as he heads to the Democratic National Convention in Chicago next week.

The Kassebaum-Kennedy legislation, encompassing the least controversial elements of the health legislation that died in Congress two years ago, passed Congress with only two dissenting votes in early August after a troubled year-long gestation.

The Senate Labor and Human Resources Committee had approved the bill more than a year ago, but it stalled as conservative GOP senators used secret parliamentary tactics to prevent it from coming up for a vote.

After the bill finally passed the Senate unanimously -- with the inclusion of a last-minute provision requiring insurance companies to offer equivalent coverage for mental and physical illnesses -- it picked up new controversial provisions in the House that liberals fought with their own parliamentary tactics.

House Ways and Means Chairman Bill Archer (R-Tex.) insisted the bill include Medical Savings Accounts, which are tax-free savings plans that can be used to cover routine medical expenses by people with catastrophic insurance coverage. Archer and Kennedy reached a compromise on the accounts last month, sending the bill to conference and final passage.

In its final form, the legislation:

Allows 750,000 Americans to buy experimental Medical Savings Accounts to test whether they can help control health costs without benefiting only the healthy and wealthy.

Increases the health insurance tax deduction for self-employed Americans to 80 percent by 2006.

Makes long-term care insurance and expenses deductible in the same manner as other health costs.

Allows dying individuals, particularly AIDS patients, to draw on their life insurance while still living.

The mental health insurance provision was dropped after a fierce attack by the business community, which contended it could bankrupt the system.

Although the final compromise bill was supported by nearly every medical, business and consumer group in the country, mental health advocates circled in front of the White House yesterday. The protesters, organized by the National Alliance for the Mentally Ill, attacked Congress for dropping the mental health provisions.

"There are 5 million severely mentally ill people in the United States and they are discriminated against by insurance companies," said Fuller Torrey, a guest researcher at the National Institute for Mental Health.

"It is too late for this bill, but this issue will not go away," Torrey said. CAPTION: Accompanied by Sens. Edward M. Kennedy and Nancy Landon Kassebaum, President Clinton arrives on South Lawn to sign health care legislation.