Call the app before trying to extract token from session

The app places the token in the session, so extracting it before calling
the app doesn't make any sense