Migrate book page to the new database schema. Fix some bugs found in user profile page.