Setting up local db code. Connected registration to model to db