In a rare scenario, because of thread concurrency, the MongoStore is not able to retrieve the newly created session after a user logged in.
This is due to the fact that a logged in user gets a new session that might not have been persisted by the handling thread before a new request for that session arrives.
So the obvious solution for this is to save the session as soon it has been created.