added function to insert record into account table
improve form and add submitting functionality