code: def login(self, db, login='admin', password='admin'):
          
          # Get the user's ID and generate the corresponding user record
          data = self.json(
              '/web/session/authenticate',
              {'db': db, 'login': login, 'password': password})
          uid = data['result']['uid']
          if uid:
              context = data['result']['user_context']
              self._env = Environment(self, db, uid, context=context)
              self._login = login
              self._password = password
          else:
              raise error.RPCError("Wrong login ID or password")
docs: Log in as the given `user` with the password `passwd` on the
          database `db`.
  
          .. doctest::
              :options: +SKIP
  
              >>> odoo.login('db_name', 'admin', 'admin')
              >>> odoo.env.user.name
              'Administrator'
  
          *Python 2:*
  
          :raise: :class:`odoorpc.error.RPCError`
          :raise: `urllib2.URLError` (connection error)
  
          *Python 3:*
  
          :raise: :class:`odoorpc.error.RPCError`
          :raise: `urllib.error.URLError` (connection error)