returns a json content in case of login failure in json mode