Changed session functions to boolean (fixes #39).