Implementing AJAX in SignUp and Removing unnecessary code.