Code review, improved checking accounts, added option (http-header-auth or password-auth)