Added session control to books.php, few other bug fixes