python Chatroom/Codehelp through the terminal

I created a system that allows individuals to ask questions about code, and chat. I wanted to make this system smaller and better because this is easy to bypass for some reason.

The modules/packages I used for this chatroom project

import os
import time

Now the actual script that contains about 56 lines of code!

print("Codehelp || Question through a terminal.")
#### Codehelp Variables
chat = open('publiclogs.txt','r')
name = input("Enter Username: ")
crown = "👑"
owner = False
#### Codehelp Scripts
if name == "":
  print("nINVALID! Name must not be Empty..n")
  time.sleep(2)
  exit()
while True: 
  with open('publiclogs.txt','a') as chat_txt:
    chat_txt.close()
  chat = open('chat.txt','r')
  print(chat.read())
  message = input("Enter Your message: ")
  os.system("clear")
  if message.lower() == "":
    os.system("clear")
    print("You must type something in order to send a messagen")
    input("Press enter to continue ")
    os.system("clear")
  elif message.lower() == ".ask":
    title = input("Enter title of Question. Also be specific: ")
    description = input("Enter description: ")
    tags = input("Enter TAGS. Seperate by ',': ")
    os.system("clear")
    with open('question.txt','a') as ask_txt:
      ask_txt.write(f'TITLE: {title}n')
      ask_txt.write(f'DESCRIPTION: {description}n')
      ask_txt.write(f'TAGS: {tags}n')
      ask_txt.write(f'Written by {name}n')
      ask_txt.write(f'-------------------n')
      ask_txt.close()
    with open('publiclogs.txt','a') as chat_txt:
      chat_txt.write(f'New Question has been asked! View question.txt!n')
      chat_txt.close()
  elif message.lower() == ".login":
    print("Welcome to the Admin log-in!")
    time.sleep(2)
    password = input("What's the Password: ")
    print("Removed from Codehelp Currently..")
  else:
      if owner == True:
        with open('chat.txt','a') as chat_txt:
          chat_txt.write(f'{crown} {name}:{message}n')
          chat_txt.close()
      else: 
        with open('chat.txt','a') as chat_txt:
          chat_txt.write(f'{name}: {message}n')
          chat_txt.close()

What could I do to improve this code?