granted = False def grant(): global granted granted = True
The login taking name and password in parameters to check if the user is already taken.