See my comment (in my history). I'm literally doing the same thing. Piece of advice: Max out your 401k every year and use a ROBS (rollover for business startup) to fund it tax free. It's complicated but totally worth it.
I could be totally wrong about this because I haven't done a lot of research. My plan is to use regular cash for down payments on traditional mortgages. I haven't decided what to do with my 401k yet, but I definitely want to use it even if that means paying the fee to pull it out in cash.
edit: here is some info, but still make sure you get a lawyer. Also regarding taking the money out, it's true that you can't just spend it. This is due to the necessary structure of the business - a c corp. You can, however, take a salary once your business becomes profitable.
https://www.biggerpockets.com/blogs/3441/52232-starting-a-re...