We try to never assume you own another one of our products in our recipes. This is why we try to use native DW server behaviors. If you own our versions, it often makes things a whole lot easier.
The difference in ours is that instead of only storing one or two session variables you can store as many as you want. Instead of only comparing two fields you can compare as many as you want, and you can name your session variables whatever you want.
It is just better ;) Yours seems to not have the access group set to the UserID field like it should in the sample code you provided.
But use securityassist instead. It is a superior solution that will pay dividends down the road rather than being stuck with the DW authenticate user.