Setup page write permissions

* Add user.canEdit(page) behaviour
* Require login for page writes
* Make currentUser variable available in views
* Add current user to menu bar
* Fix bug in middleware running on static
* Fix bug where all users queried when not logged in