added ajax functionality to registration controller actions