Rework login. Don't store credentials in .netrc.

Why do we need this global variable?