Remove login routine and return $login_customer_id to login.php to perform the core login.
Move ext/modules/payment/paypal/login.php redirect code to main module (preLogin() and postLogin() module methods).