Are you using this loan to live beyond your means?
The answer is probably “yes” if this isn’t your first loan, if you’re consolidating credit card debt or if you’re buying something you otherwise couldn’t afford. Fix the spending problem before you create a retirement problem.
Do you have a plan to avoid default?
Ideally, you would have resources such as savings or home equity you could use to repay the loan if you left your job. If you have such resources, the next question is: Why aren’t you using those instead?
Can you keep up retirement contributions?
If you cut back while repaying the loan, be prepared to step up your contributions once you’ve paid off the loan. A good rule of thumb is to add the loan repayment amount to the amount you contributed before the loan and contribute that much until you retire.