Restrict subscription ONLY to logged in users

I want to prevent ‘strangers’ (ie users who are NOT logged in) from being able to subscribe to a Membership Subscription.

I’ve placed the [renewform] and [subscribeform] shortcodes to only display when a user is logged in, however I’ve noticed that someone can go to to bypass and subscribe.

Is it possible to prevent them from doing so?