Added the ability to use username/password or tokens.