Fixed problem with detecting session ID if response contains multiple Set-Cookie headers. This patch works with both Tomcat6 and 7.
Minor changes related to commit 095b6fe