Added ability to authenticate by API token

In case of you don't want to share the actual password, it is better to
use API token. This change allows you to choose either login with
password or token