Sounds like you are confusing contracts with titles with loans.
Legal owner of the property gets the income and claims the deductions - unless some sort of trust or partnership relationship.
All owners must go on the loan or guarantee the loan. Non owner spouses can go on the loan, even...