Login not working when running on nginx + apache

When installing CKAN (current master) from a deb package [1], or on http://master.ckan.org,
after registering a new user you get redirected to the login page instead of the dashboard. Trying to login always fails even with good credentials. Creating a user on the command line and trying to login with it also fails

@brew I wonder if this has something to do with the recent repoze.who changes?

Here is the standard apache / nginx configuration that we generally use:

https://github.com/ckan/ckan-packaging/tree/master/etc

Any ideas?

[1] http://packaging.ckan.org/build/python-ckan_2.3-15_amd64.deb