add js for login and register