Roles settings
From MoodleDocs
The "Default role for all users" should be set to Guest in order to add users to the global database without giving them access to all courses, which is the result if this setting is anything higher than Guest. Students need to be added with course administration tool.