Added permission checking to all pages

Redirects to login page if you do not have high enough permission.