I'm not a lawyer, so this isn't legal advice. For that you should see a lawyer. However . . .
A straight 2 year lease: Your contract is the lease. It entitles you to live there. Nothing more. Long story short: You're out of luck.
A lease-option or rent-to own: I'm guessing this may have been it since you say ""Since we were to buy the property after the two year lease was up," then you look to the option. What does the option say? And for what reason is the owner defaulting? But first: Is the option in writing? If not--if it was just an oral agreement that you'd buy--then that's not enforceable. You're out of luck.
So, if it's in writing: If the owner went into foreclosure: You're out of luck. You're not protected.
If you have it in writing and if the owner has changed his mind and has decided to sell the property to someone else, then you have something to work with. See a lawyer for ways to block the sale to another party. However, you'd be in a better position--and it's too late now to do this--to file a notice at the courthouse to cloud the title. It'd be like a lien--it would attach to the title and would serve as a red flag for anyone else considering buying. If you had a lawyer going into the agreement--and the lawyer knew what he/she was doing--that might have been suggested to you.
As for the money you've invested in the home on repairs--what does your lease say? It probably doesn't protect you. Often, lease-options are structured so that while you may have the ability to do some repairs or improvements (with or without the owner's permission), those improvements stay with the house. And that's almost always the way it's written in leases.
So: See a lawyer. A lot will depend on: (1) whether there was a written option or agreement to purchase; and (2) if so, what that agreement said.
Hope that helps.