Correction : Bug on login panel is corrected

Move <h:form id="formDialog"> inside the dialog

Because when you use appendToBody=true the content of the dialog being
appended to the BODY of your page... And in you case its being taken
outside the h:form and as you know commandButtons must reside within a
h:form in order to work.