def login(self, event=None):
    username = self.username_entry.get()
    real_name = self.real_name_entry.get()
    if self.requester.login(username, real_name):
        self.username = username
        self.real_name = real_name
        self.unbind('<Return>', self.login_event)
        self.show_friends()
    else:
        msg.showerror('Failed', f'Could not log in as {username}')
def login(self, event=None):
    username = self.username_entry.get()
    real_name = self.real_name_entry.get()
    if self.requester.login(username, real_name):
        self.username = username
        self.real_name = real_name
        self.unbind('<Return>', self.login_event)
        self.show_friends()
    else:
        msg.showerror('Failed', f'Could not log in as {username}')