use req.popit for database name rather than deriving it from slug

if using the popit method to determine the database name then get the name of the database from the req.popit object as it's possible that the name of the database may not be the same as the slug now.