Business logic handler permissions

Hi. I 'm trying to implement an handler (afterCreate in Java) with some Database operations inside.
I have read this topic and i have created code suggested(with superuser) but , after first login, when i get the token from Cache, the handler returns with “no permission” error. I can’t login on every handler call, because of “Multiple login limit for the same user account has been reached.” error. Which is the solution??

Thanks

How about calling the logout API at the end of your business logic method?

If it is the only solution, i’ll do it.

Yes, that would help with keeping the concurrent login count lower.

ok, thanks.