There are 2 ways to do this. 1) Have the bank approve that title/escrow company issuing the deed in both names even though only 1 person is on the mortgage. 2) After the deed is issued in your name, quitclaim the house "from [me] to [me & my spouse], as joint tenants with right of survivorship." The disadvantage of this approach is that it MAY trigger the due on sale clause in the mortgage if the bank finds out about it. Banks usually don't bother to check, though. 3) Create a living trust, have the trust own the house from the get go, and specify that the surviving spouse gets the house. This also avoids probate fees on the house. You can set up a simple trust using self-help law books, or hire an attorney to do it if you want to make the trust part of your overall estate plan.
You might want to draw up a home ownership contract/post-nuptial agreement that specifies that the house goes to the person who is on the mortgage, so that you don't have the situation of A living in the house while only B is liable for the mortgage.
------------------
This is not legal advice and you are not my client. Double check everything with your own attorney and your state's laws.