Simplified tutorial is here.
(Warning: This tutorial is storing clear-text passwords in the database.)