How do I display “Hello username” if logged-in on the homepage

try my variant:

<?php if (!is_user_logged_in()) : ?>
    <form action="<?=get_home_url(); ?>myaccount" method="POST">                                            
        <input type="submit" value="<?php _e('Hello, Client! Click to sign in:', 'theme'); ?>">                     
    </form>
<?php  else:  ?>
    <a href="<?=get_home_url();?>myaccount"><?php _e('Hello ', 'theme'); echo wp_get_current_user()->user_login;?></a>
    <a href="<?=wp_logout_url(esc_url( 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ));?>myaccount">Logout</a>
<?php  endif; ?>