Source code of the demos in my JavaOne 2013 presentation "Please Log In: Authentication and Authorization in Java SE and Java EE"