Workaround to solve the problem with concurrent sessions pointed out in:

https://tools.ipol.im/mailman/archive/discuss/2012-December/000969.html

Copied from Gabriele Facciolo.
Merge branch 'master' of github:carlodef/ipol_demo