A landlord who tried to charge a prospective tenant for having overnight guests has been ordered to repay the holding deposit.