Added basic auth check to registration