Added previously removed session code