Make the login test a bit more robust

http://hydra.nixos.org/build/10397037