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).
what about doign some quick validation checks on the api keys?. like making sure it's an hex string of 32 chars ?. A quick regex should suffice - `[0-9a-f]{32}`