Multiple auth mechanisms

Also added loading token from json request.