changed errors control in registration and autharisation