def register(email, password): account = Account() account.email = email account.password = password meta.Session.add(account) meta.Session.commit() rpg_session.account = account return dict(account=account)
def login(email, password): account = Account.find_account(email, password) rpg_session.account = account return dict(account=account)