fix a bug that lead to wrong return code
fix a bug that lead to failure of get values of username/password