Improve register

I think this could be a better way to manage registration error
plus adding unique to the email field.