Get rid of $_SESSION directly usage

https://www.drupal.org/node/2380963