Improved HTML Form processing

Added support for sessions in case cookies are set on the login
page.
Added an HTML parser to find hidden field values and to find the
failure string.