'Uses the Django admin api. Note that unlogged-in commands
have a unique position in that their `func()` receives
a session object instead of a `source_object` like all
other types of logged-in commands (this is because
there is no object yet before the player has logged in)'

def func(self):

    session = self.caller
    arglist = self.arglist
    if ((not arglist) or (len(arglist) < 2)):
        session.msg('\n\r    Usage    (without    <>):    connect    <email>    <password>')
        return
    email = arglist[0]
    password = arglist[1]
    player = PlayerDB.objects.get_player_from_email(email)
    if (not player):
        string = ("The    email    '%s'    does    not    match    any    accounts." % email)
        string += '\n\r\n\rIf    you    are    new    you    should    first    create    a    new    account    '
        string += "using    the    'create'    command."
        session.msg(string)
        return
    if (not player.check_password(password)):
        session.msg('Incorrect    password.')
        return
    bans = ServerConfig.objects.conf('server_bans')
    if (bans and (any(((tup[0] == player.name) for tup in bans)) or any((tup[2].match(session.address[0]) for tup in bans if tup[2])))):
        string = '|rYou    have    been    banned    and    cannot    continue    from    here.'
        string += '\nIf    you    feel    this    ban    is    in    error,    please    email    an    admin.|x'
        session.msg(string)
        session.execute_cmd('quit')
        return
    session.sessionhandler.login(session, player)
