Login code on python

Hello, I'm trying to make a login code for my game algorithm but it isn't working as I want it to so can someone help to stop my loops from repeating when I don't want it to please?

def login(): 
  username = input("Enter username: ")
  password = input("Enter password: ")
  file = open("Account.txt","r")
  account = file.readlines()

access = False
while access == False:
for user in account:
if username in user and password in user:
login = user.strip("\n")
login = login.split(",")
if username == login[0] and password == login[1]:
access = True
print("Welcome", username)
else:
print("Username or Password is incorrect, try again.")

else:
print("Username or Password is incorrect, try again.")
username = input("Enter username: ")
password = input("Enter password: ")

if access == True:
break

all my indents are correct i just had to remove them from this (im new i don't know how to use this)