fix randomly failing login related tests