Handling headers with multiple values correctly.

Selecting only the first header among a list of headers lead to lost cookies. 
This made it so the login from the blog admin panel would fail to set
cookies.

Now any header with multiple values is joined by the newline character per
http standard.