In terms of a business trading in a normal way that has no issues with insolvency (as per the OP) the loan is treated the same as any other debt in the company.
If the company goes bust, it is a different situation altogether, but the question is asked regarding a solvent company and a loan made by a director of that company so the issue of preferential creditors does not arise in this situation.
edit - reading my answer again, it should have said "treated the same as any other equivalent debt"