I'm not sure why do you mix the "set course password" feature with the "legal agreement" code.