The federal government agreed Monday morning to provide an additional $30 billion in taxpayer money to the American International Group and loosen the terms of its huge loan to the insurer, even as the insurance giant reported a$61.7 billion loss, the biggest quarterly loss in history.