Add  register page and pre-load js functions to API