added client side validation. added form elements for role selection