Log out after plug-in calling Data API

I got an issue need help. I have a page with a button to trigger an action in a plug-in I build. The action will call Data API and update the data.
For unknown reason, after triggering this button, the application will log me off when I tried to open another page.
Is there anything I need to do with my plug-in? I use client-side script for the action.