* added automatic retries on 429 (too many requests), 502 (bad gateway) and 504 (gateway timeout) * added automatic logout