Smarter handling of non-JSON response from the server
First step of MyAccount refactoring