Added more graceful handling of bad credentials or no results found