Multiple auth mechanisms

#62  Also added loading token from json request.