add js file and define redirect