Merge pull request #576 from mariroz/fix-session-livetime

fix of  _SESSION - indefined variable
Merge pull request #581 from mariroz/fix-session-livetime

fix of issue under nginx and php-fpm
fix of localhost cookie related to nginx binding to 0.0.0.0