updated register.xhtml with ajax functionality