Hi Oll,
I am not sure, but I think you should be able to set a field in databases as unique (Assuming you are using a database to store the names). You'd probably get that error message.
But for sure: You can do a query on the database on username upon post (Basically, the post of the form is to the same page, which has multiple load options, depending on the input), and if the name exists you just reshow the form, and put in a line telling the person that that username is in use already.
If the username is good, a part of the page is loaded which is the 'welcome to the site' or something page
Hope this is waht you were looking for,
J.