Naive password checker
Whenever you are passing arguments in C++, you must be a bit more careful. Since C++ is a default by-value language, passing in a std::vector the way you are doing it will create a full copy of the vector each time you call the function. This is expensive, and not needed. Instead, you should be passing by const &amp;:

bool check_pass(const vector&lt;string&gt;&amp; tomatch, const vector&lt;string&gt;&amp; userlist)


The same thing applies when using a range-based for loop:

for (const string&amp; uline : userlist)


Or you could simply let C++ deduce the type for you, using auto:

for (const auto&amp; uline : userlist)


string has some methods that can help make your code a bit shorter and clearer; such as find:

auto place = uline.find(',');


As @janos has already mentioned, using a map (or unordered_map) would be a better fit here. This could look something like:

std::unordered_map&lt;std::string, std::string&gt; user_to_pwd;
while (getline(userfile, line)) {
    const auto index = line.find(',');
    user_to_pwd.insert(
        std::make_pair(line.substr(0, index), line.substr(index + 1));    
}


Your check_pass function could then simply take three parameters: the map, and the username and password. This then becomes a (fast) lookup:

bool check_pass(
    const std::unordered_map&lt;std::string, std::string&gt;&amp; user_pwds, 
    const std::string&amp; user, 
    const std::string&amp; password)
{
    auto it = user_pwds.find(user);
    if(it == user_pwds.end()) {
        return false;
    }
    return it-&gt;second == password;
}


Note also that you should not use using namespace std; up the top. This pulls everything from the std namespace into the global namespace, which can cause all sorts of issues. For small programs it probably won't, but it's best not to get into the habit of using it anyway.