fixed bug in determining if username or password are set