fix trying to edit without being logged in