Same-sex marriage bill signed; thousands cheer at Capitol