Add validate method to User class.
Don't encode user password if it's empty.
Move twig configuration from register() to boot().
Add support for flash messages in layout template
Use app.user to test for login instead of checking for ROLE_USER.
Add register and view actions.