Adds registration functionality to sql db