Add functional tests

Closes #17
How does this work with the CSRF token?