<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _login(self, credentials):
 """ Actually login to our portal with the given credentials. """

        d = self.portal.login(credentials, None, IBoxReceiver)
        def cbLoggedIn((interface, avatar, logout)):
            self.logout = logout
            self.boxReceiver = avatar
            self.boxReceiver.startReceivingBoxes(self.boxSender)
            return {}
        d.addCallback(cbLoggedIn)
        return d