added password middleware
added documentation to configuration