Added home and debug pages, added protection against direct view access