WP redirect to custom login page if a user is not logged in

You are establishing a redirect for all requests for a visitor, including /account:

  • Request to /, user is not logged in – redirect to /account.
  • Request to /account, user is not logged in – redirect to /account.
  • Request to /account, user is not logged in – redirect to /account.
  • (etc.)

To break the loop, perform the redirect only if the request is not for your login page:

function redirect_login_page() {
    if ( ! is_user_logged_in() && ! is_page( 'account' ) ) {
        wp_redirect( home_url('/account/') );
        exit;
    }
}
add_action( 'template_redirect', 'redirect_login_page' );