added unique constraint
fixed register function
ajax call now does html insert with response
html to be injected upon registration