FORECLOSURE and UNLAWFUL DETAINER

Here are some things to think about:

1.  A loan was never made.
Instead, the note was monetized, debited to the bank's cash account, and credited to a demand deposit account in the name of the note signer.
The note is merely prima facie evidence of a loan.  In other words, the note exists, but was a loan actually made.  You have to look at the accounting entries and the paper trail to know for certain.  You were the source of the money, and they simply used it to finish the objective.  The bank never used its own money and never were at risk for loss.

2.  Assuming a loan was made, the foreclosing entity is not a holder in due course.
As the note and the deed of trust transfer from entity to entity, the only entity entitled to foreclose is the last owner in the chain of holders.  Any break in the chain will invalidate the remainder of the chain forever.  The note probably was securitized into a REMIC trust, and became a part of a pool of loans without the deed of trust.  IRS REMIC rules require that the trust not have any actual assets, so the deed of trust becomes separated from the note, forever and can not be rejoined.  When the deed of trust becomes separated from the note it is no longer effective, and the property title must be immediately returned to the borrower (read the fine print in the deed of trust).

3.  Under California codes, and perhaps in other states, if an affidavit is made that claims the original note is "lost", then the court may accept a copy as the original.  The word lost does not mean we don't know where it is; it means we do not have access to the note.  The reason there is no access is because the note is lodged with the REMIC trust.  In other words, the bank is lying and making a false claim in their attempt to rejoin the note and the deed of trust.

4.  The bank should be sued.  If the bank is already suing (as in an unlawful detainer action), then a counterclaim should be filed.
In an unlawful detainer action, the defendant is considered as a "tenant" and may not counterclaim.  However, when the defendant has an ownership interest in the property he may counterclaim the unlawful detainer.  See mortgage, foreclosure notes for exception.