Update checkCredentials

Update checkCredentials to work correctly