Thre are several issues here and for proper appropriate advice I would strongly ask that you contact the company's accountant/auditor who will be able to explain them fully to you.
In brief however they concern two areas , Company Law and Revenue Law. Under Company Law you cannot take a loan of more than 10% of the net assets of the company in a loan or it is an illegal loan. The net assets will be available from the companys accounts. Under Revenue Law even where the loan is "legal" under Company Law, there are procedures regarding the Company paying a tax charge, which is then repaid to the company if the loan is repaid by the director.
As I said in the beginning, you need to speak with the company's accountant/auditor before doing this. You could easily fall foul of several serious pieces of legislation by not doing so.