Update index.js

Added ability to authenticate with JWT.