and welcome to the site!
"as simple as possible" is not always counted in clicks. Most of the sites use two separate (but linked) pages for signup and registering because these are different use cases.
Different data: Usually, on the signup page there's a second password field, to make sure the user did not mistype the first password. If you want to know more about your users (e.g., email, name, etc.), the registration page needs even more data.
Convention: Users are used to two pages, and might be confused if you combine both use cases on one page.
Unclarity: It might be better to separate two different phases in your user's relation to your service on two different pages. This will make it clear to the users where in this lifecycle they are. For example, do all potential users (older people?) exactly know the difference between "Register" and "Login"?
If you want to be thorough, do user testing with your potential target group: Present both alternatives, and observe how the alternatives fare. Ask testers to think aloud, to get a chance to understand how they behave. (This is called a "Usability Test" in the UX world.)
Only if the test indicates that your new solution is superior to the conventional approach, go for it. "Superior" can mean different things here: Higher conversion, quicker task completion, less errors (for both tasks), but also perceived qualities like satisfaction, innovation, etc. Which criteria are important depends a lot on how you want to attract users.