The order of configuration options generally doesn't matter. The only time order matters is when a command establishes a new context; commands that apply to the context have to appear after it. E.g.
router rip redistribute static
is not the same as
redistribute static router rip
because "redistribute" applies to the specific router context it appears within. Since "login" nor "password" both apply to the line context they appear in, all that matters is that they both appear after the "line" command, but the relative order of them doesn't matter.
It doesn't matter in this case the order that you put the commands in. The router will though always display them in some particular order no matter what order you use to put them in. The order may I guess vary with software versions but in general that is very unusual.
In the case of some other commands such as access-list entries the order of entry is preserved in the configuration since in that case the order does affect the behaviour.