I took out a 401k loan for a real estate purchase last year so I have given it some thought. I'll give a fuller answer later but for now here are the tax implications:
(1) You are not losing out tax-wise on the principle from taking out a 401k loan. You are borrowing $50k and putting $50k back in, so no loss there. Yes, you will eventually pay taxes on this amount when you take it out but you would have anyway.
(2) You are losing out tax-wise on the interest you pay. This will happen when you eventually take it out. The 6.5% interest you pay in was already taxed elsewhere and now you are putting it into a pre-tax account where it will get taxed a second time.
(3) Loans from a 401k are NEVER tax-deductible. Even if you use it for real estate investment, it cannot be claimed as an expense. Someone above said you can deduct this, they were wrong. I will find the tax-code and quote it for you later, its a special rule for 401k's.
More to come later.