fix bug and recode edit and registration form

better codding