Improve session initialization