Pass var on login to session

When succes on Login the email is passed to the session (see below). I also want the ID to pass to this session, how to do this? And how to acces that var inside a view of in Layout?

    if ($bcrypt->verify($this->password, $passwordHash)) {
        // Great! The password hash matches. Return user identity (email) to be
        // saved in session for later use.
        return new Result(
                Result::SUCCESS,
                $this->email, 
                ['Authenticated successfully.']);        
    }

I assume Result in your example refers to Authentication.
By itself, Result and/or Authentication have not much to do with sessions.
You might want to take a look at zend-session.
That might be the missing piece you are looking for.