register.html and login.html fully working with ajax