Woocommerce replace add to cart button with custom link in product single page

Add below code in your theme function.php

// Add custom link in product single next to add to cart button
add_action( 'woocommerce_single_product_summary', 'login_button_on_product_page', 30 );
function login_button_on_product_page() {
    global $product;
    $link = get_permalink(get_page_by_path('my-account'));
    echo '<button type="button" data-default_text="Login" data-default_icon="sf-icon-account" class="product_type_simple button alt" onclick="window.location=\'' . esc_attr($link) . '\'"><i class="sf-icon-account"></i><span>Login</span></button>';

// Remove add to cart button in product single page
// define the woocommerce_before_main_content callback 
function action_woocommerce_before_main_content( ) { 
    global $product;
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
// add the action 
add_action( 'woocommerce_before_main_content', 'action_woocommerce_before_main_content', 10, 2 );