[backport-1.5]: CI login tests are failing sometimes due to timing issue
A solution for issue
#3165 (closed)
needs to be backported to 1.5.x