fixes stored password check with legacy encoding.