check user logged in before editing