The answer is: just don't do it unless it is absolutely necessary.
There are two things to consider. First is that the interest rate is normally mush higher than an equity loan. It is true that you pay interest back to your 401k account but you need to pay double taxation on the interest, because the interest is collected from after-tax money and when you retire and try the money from 401k, you need to pay income tax on that portion again. Second, the biggest downside is that if you lose your job, you have to pay back the 401k loan in full with 30-90 days and that can be a big hassle.