title: OctoberCMS - Rainlab User Plugin - onLogout - Not found
body: <p><strong>Login page</strong></p>
  
  <p>Included User's Account component in login.htm page, <code>data-request="onSignin"</code> works fine
  <a href="https://i.stack.imgur.com/oJpgN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oJpgN.png" alt="enter image description here"></a></p>
  
  <p><strong>Logout button</strong></p>
  
  <p>Included Session's component in the navigation partial, <code>data-request="onLogout"</code> , hit error
  <a href="https://i.stack.imgur.com/WlSh8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WlSh8.png" alt="enter image description here"></a></p>
  
  <p><strong>Ajax handler not found</strong>
  <a href="https://i.stack.imgur.com/FQ151.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FQ151.png" alt="enter image description here"></a></p>
  
  <p>Questions: Can I include [session] in global partial to make sure "Logout" Ajax handler can trigger on every pages?</p>
  
  <p>OR do I need to include [session] in each of every my created pages <em>( this seems really hardcoded )</em> ? May I know what's the best practice of doing/including the component</p>
  
  <pre><code>[session]
  security = "all"
  ==
  &lt;header&gt;    
      &lt;nav&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="{{ 'login'|page }}"&gt;Login&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a data-request="onLogout" data-request-data="redirect: '/good-bye'"&gt;Sign out&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/header&gt;
  </code></pre>