When customer registers in one of the multistore shops then NOP saves data in which store customer was registered (Registered in the store field under customer account in admin).
Every time user tries to log in to one of the multistore shops then store id is checked and in case of correct shop and correct credentials customer is logged in.
In case shop id doesn't match (customer has registered in other multistore shop) then customer is redirected to correct shop and in case of correct credentials is logged in.
Users with administrator rights can log in to all multistore shops (admins are the same for all multistore shops)
Users are unique within multistore solution meaning that same username cannot be used for different multistore shops.
When store 1 customer is on login page for store 2 and chooses "forgot password" then email with store 2 link is sent and customer can change password and customer afterwards can log in to store 1 NOT store 2.
In case it is chosen that one of the multistore's shops (or multiple shops) must be accessible only when logged in then redirecting between shops is done as described below:
Shop requires logging in:
in case customer is logged in to same shop
the url is opened
in case customer is logged in to other shop
then customer redirected to the shop where customer is logged in. (if product doesn't exist in that shop then "page not found" displayed)
in case customer is not logged in
customer is redirected to login page
Shop doesn't require logging in:
url is always opened.