Deal with the cases where either the `login` param is given without the `api_key`, or the `api_key` is given with the `login`.
Deal with the cases where either the `login` param is given without the `api_key`, or the `api_key` is given with the `login`.