redirect should be exclusively in a django view. Instead of this, return the token url, and redirect from the view.