User and login mapping after an SQL Server restore
It doesn't matter when the logins are created.  As long as the SIDs match, the database user will be associated with the login.

Every time a user attempts to connect to a database, SQL Server is going to check for a mapped login (unless it's a contained database).  It does this by checking to see if there is a login with a SID that matches the user's SID.  Accordingly, it doesn't matter when the login was created because it will be matched at the the time the user attempts to connect to the database.