Added check to leasefile before login