Added check of username and password for correctness, closes #38