President Barack Obama on Wednesday signed into law the agreement passed by Congress last week to extend the payroll tax cut and unemployment benefits while preventing a cut in payments to Medicare doctors.