registration hooked to db