There is a problem when the user stay logged but the cookie/token is not valid anymore, the user then get the message "No token provided" but is still kind of logged.
Probably add a condition where if the "No token provided" is returned, logout the user and redirect him to the index.
There is a problem when the user stay logged but the cookie/token is not valid anymore, the user then get the message "No token provided" but is still kind of logged.
Probably add a condition where if the "No token provided" is returned, logout the user and redirect him to the index.