Add post functionality for forms and asynchronous code with JSON