'Hook called by sessionhandler when the session becomes authenticated.
Args:
player (Player): The player associated with the session.'

def at_login(self, player):

    self.player = player
    self.uid = self.player.id
    self.uname = self.player.username
    self.logged_in = True
    self.conn_time = time.time()
    self.puid = None
    self.puppet = None
    self.cmdset_storage = settings.CMDSET_SESSION
    if self.csessid:
        csession = ClientSessionStore(session_key=self.csessid)
        if (not csession.get('logged_in')):
            csession['logged_in'] = player.id
            csession.save()
    self.player.last_login = timezone.now()
    self.player.save()
    self.cmdset = CmdSetHandler(self, True)
