Added logged in check for linking.