import os
import dotenv
import random

dotenv.load_dotenv()

EMAIL = os.getenv('LOGIN_EMAIL')
PASSWORD = os.getenv('LOGIN_PASSWORD')

tokens = []

def login(email, password):
    if email == EMAIL and password == PASSWORD:
        token = str(random.randint(100000, 999999))
        tokens.append(token)
        return token
    return False

def token(token):
    if token in tokens:
        return True
    return False