You'd be better off to pay off the loan first, unless you can invest any money you have for more interest than what you pay on your loan, this goes for any disposable income, not just lottery millions.
Of course you still need some flexibility though.