Add login command

One step at a time. :)

This PR adds a `login` command that stores the SH's key in the `netrc` file.

Also, I've improved the management and dependency control of commands so we don't need to repeat common code.

Finally, a function to read the key from several sources was added. This functions should be useful in other commands (I'm currently using it on the `log` command).
There are no specific reasons :)

`findall` process the groups and returns a list, so probably it's not the best choice. Reading the docs [1], it looks like `match` is a good option here because it checks for a match only in the beginning of the string.

[1] https://docs.python.org/2/library/re.html#search-vs-match