added complex validation of server response
fixed typo
added validation for server failure
added validation for token server failure