registration working with ajax