Fix bug which allowed all passwords in authentication. Fixes #227