Add form and query helpers needed for Facebook auth.

Legacy, these used to be in separate files based on functionality.  I'll clean it up.