However, in states such as Massachusetts - where gays and lesbians can legally marry - the appeals court judges ruled that the federal government cannot deny these couples the right to file a joint federal tax return or to receive a survivor???s benefit under the Social Security Act.