added proper return values for checkPassword