Only allow access when user has a subscription plan on Memberpress

if anyone else is trying to achieve the same, I found the solution here:

Simon: one last question: for how long is a user logged into Discourse before being logged out? or is the user logged in forever until they click the “logout” button?