Pulled out demo code from radius.js