Putting arguments in front of server

When trying to log in to a private registry (quay.io in my case), the login command only worked when I put the arguments before the server. This also matches with the usage docs (http://docs.docker.io/en/latest/reference/commandline/cli/#login):

    Usage: docker login [OPTIONS] [SERVER]