fix session management and all other bugs

make search non-blocking
