fix only save if logged in