Updating logic for final redirect to the original URL request to
work similarly to the logic found in the Tomcat Form Authenticator.
This update fixes IllegalStateException errors during the redirect,
and also adds support for POST operations being the initial request
to a protected resource.
Merge pull request #155 from kreichert/master

Fix and improve redirect to original URL.
Merge remote-tracking branch 'upstream/master'