This sample demonstrate how to realize user authentication using spring and hibernate.