Added secret_token logic