I'm a little stuck on my app and can't figure out certain parts

Hi, so I'm working on an app that will allow students to connect to students and teachers all over America for help with high school subjects, and the main problem I've run into is I can't figure out how to make it to where they will create an account and be able to log in and out of the account. Another problem is I want to be able to limit the amount of people in one study group. Can someone help explain how to do these steps?

You can increment an integer each time a user registers. Once it hits the threshold, you can stop allowing users to register (using an if-else condition).