def new_user_view():
    """
    User is directed here if they selected that they are a new user to this system
    Here, they enter a username and password
    Those are stored in the database
    User is then redirected back to the main login page to login as an existing user
    :return:
    """
    screen = curses.initscr()
    screen.clear()

    screen.addstr(5, 5, 'Enter Username:'******'Enter Password:'******' account created...')
        screen.refresh()
        time.sleep(2)
        dashboard_database.database_menu(username)
    else:
        # print "User already exists"
        screen.addstr(11, 5, 'Username ' + username + ' already exists...')
        screen.refresh()
        time.sleep(2)
        dashboard_program.main_menu()
def existing_user_view():
    """
    User is directed here if they choose that they are an existing user
    In this function, user enters a password and user name
    And these are validated through calls to the database.
    If they are acceptable, they enter the database viewer, if they are not,
    They are returned to the main menu
    :return:
    """
    screen = curses.initscr()
    screen.clear()

    screen.addstr(5, 5, 'Enter Username:'******'Enter Password:'******'Logging you in...')
        screen.refresh()
        time.sleep(2)
        dashboard_database.database_menu(username)
    else:
        screen.addstr(11, 5, 'Invalid username/password. Try again...')
        screen.refresh()
        time.sleep(2)
        dashboard_program.main_menu()