add js redirect home for error page