Added template views for pages and changed some logic for displaying private pages