trying unsucessfully to caste to json to get authentication response