added passwords checking and used user checking for registration form.