title: How to get user role from jwt token
body: <p>In server side I have those code to login:</p>
  
  <pre><code>return jsonify({'email': email, 'token': create_token(email, isAdmin, password)})
  </code></pre>
  
  <p>In client side I need code to check login and isAdmin.</p>
  
  <pre><code>isLogged() {
  if (localStorage.getItem('currentUser') &amp;&amp;
      JSON.parse(localStorage.getItem('currentUser')).email) {
    return true;
  }
  return false;
  }
  
  isAdmin(){
    //???
  }
  </code></pre>
  
  <p>How can I get user role from token?</p>