Fixed failing login test

Tested at test2.wikipedia.org and en.wikipedia.beta.wmflabs.org.

Bug: 50130
Change-Id: I6467cd14ce6a193c45a803c6798c176dcc7a444a