the difference, is that in the coupon code recipe, you use a form value to set the session variable. In this case, the form is not needed, the session is automatically created at login time.
Ignore the portions of the coupon code recipe that deal with creating the form, you are only paying attention to the portion that deals with creating the discount rule.