Connected Registration to database