sessions work fine
improve some functions (generate_cert, set_cert)