Invalid token even with the authentication process going as planned

Yep, should be using token. I have no idea where I got code from. Thanks.