refactor login form duplicate
generate and submit form code abstractions