Patch from MaxSem re bug 15162 - handle throttling in the login API