Adding authentication check. Password hash is stored in pwdFile.