Nice password example ;-).
Yes, and here are my brainstorms on how this would be done ...
As an author, you would create a variable, but instead of it beinga NUMBER, it would be an INPUT variable. This means, at the beginning of the game, the player would be given a textbox and have to enter the value of the variable. Next, you would go to a link and set a variable restriction, for example (PASSWORD = "asdf") and block the link if the password was incorrect.
You could also use INPUT variables for madlibs and to make the game more personalized ("Your mother shouts, %%YOURNAME%% clean your room!!!").