Login and create username and password program
I have some suggestions, some regarding the code and some regarding the logic of it. Generally this is a nice code.
Let's begin, logical suggestions:


First of all, the code does not run. SyntaxError: name 'newUser' is used prior to global declaration. You should put the global keyword before declaring the variables.
Use the __main__ function. Usually when writing a good python code you do not write logic outside of functions. This will make your code more readable. You can than put the logic in a while True loop and keep accept users forever and not just twice.


Coding suggestions:


Magic numbers. The number of time you can accept a wrong password is 3, make it a constant: NUMBER_OF_ERROR = 3.
You do not need to declare x outside of the login function.
Instead of x += 5 just use break, it makes much more sense.
Do not call the login function at the end of login. It creates unnecessary recursion.


That's it.
Good luck and have fun