ensure that user is logged in when editing pages