npm-users is a package that allows you to have multiple npm users on the same machine. When you install the package, you will be able to run npm-users add <alias> which will log you into npm and create an alias for your .npmrc file. Each time you add a new user, another alias is added. You can then easily switch between users by simply running npm-users list and npm use <alias>.
This package was born out of the frustrations of having to log in to personal / work accounts.
npm i npm-users -gUsage: npm-users [options]
Options:
a, add <alias> Add user
r, remove <alias> Remove user
u, use <alias> Use user
l, list List users
w, whoami Current logged in user
-h, --help output usage information