Revert "Revert "Websockets sessions and pdo part1""

This reverts commit abb0a1043b47d243ea95d0f45ee1c50e1a368198.