as a stab in the dark, my shout is...
the judge will say the loan didn't follow proper procedure and thus was illegal, however they were forced to do it by the rent being withheld....
result, slap on the wrists and small fine for council, with costs to be paid by each side and no compo awarded.