code: def get_redirect_url(self, request):
          
          cp = request.GET.get('cp')
          user = request.user
          Token.objects.filter(user=user).delete()
          token = Token.objects.create(user=user)
          return '{0}?username={1}&token={2}'.format(cp, user.username, token.key)
docs: refreshes token and returns the captive page URL