I assume that you use cookies (I don’t see how “Remember me” will work differently).
When a user logs in, set two cookies, one permanent (if "Remember me" is checked) and one temporary (this session). The second is what you use to authorize the user.
So, on the page where the user should log in, find the session cookie. If found, continue as usual. If not found, find the persistent cookie, if it is found, look at the user, set the login date and set the session cookie. (If a persistent cookie is not found, it simply is not logged in).
source share