register logic. contains database changes. please match your schema manually. sigin in form to follow