Added authentication to registration