User plugin - Register and login on same page - activation error

I’m working with the Rain\User plugin and I have my registration and my login on the same page (for now, it maybe does not make sense and I may change it).

When I click the “Confirm account” link in the “Confirm your account” email twice, I get a “User is already active!” (~/vendor/october/rain/src/Auth/Models/User.php line 258) error 500.

I know, that I may should put the registration on its own page, but I just wanted to ask, if I do something completely wrong?

Here’s is how I catch this error for now, in page code on said register and login page:

function onStart() {
    $loggedIn = Auth::check();
    if ($loggedIn) {
        return \Redirect::to('/scan-petition');
    }

    $user = \Auth::getUser();
    $params = $this->param('activate');
    $activateParam = request()->get('activate');
    if (null === $user && isset($activateParam)) {
        return \Redirect::to('/'); // remove activate param by redirecting
    }
}

Here are my page components with settings of which I’m also not sure about:

[session]
security = "all"
allowedUserGroups[] = "petition"
redirect = "scan-petition"
checkToken = 1

[account]
redirect = 0
paramCode = "code"
requirePassword = 0

The on page code provided above does not work. The error does not appear, but also the user don’t gets activated like that.

I think, like that it works:

<?php
    use October\Rain\Auth\Models\User;

    function onStart() {
        $loggedIn = Auth::check();
        if ($loggedIn) {
            return \Redirect::to('/scan-petition');
        }

        $activateParam = request()->get('activate');
        if (isset($activateParam)) {
            try {
                $userModel = new User;
                $userModel->attemptActivation($activateParam);
            } catch(\Exception $e) {
                return \Redirect::to('/');
            }
        }
    }
?>

But I’m still not sure, if this is the way to go.