One popular approach is to install Fail2Ban to monitor log files and lock out repeat offendors.
Here are some simple steps to make the process more secure.
They can be used not just in Java Script, but also PHP, Perl, Java and many other languages.
Some text editors (not just vi) also allow them when searching for or replacing text. This is a new technique available in modern browsers and definitely the way of the future.
If the purpose of registration is to confirm that the person exists, and that they have supplied a valid email address, then as part of the registration process you a should email them either: a random password; or a confirmation token.
Do not let them choose their own password and use it immediately without verifying that they exist.