Token check failed when accessing modal from frontend (Fix #156)