Add log monitoring and fix bugs on cookies