need better logged in check