code: func (m *MemoryBackend) Authenticate(client *Client, user, password string) (bool, error) {
  	// acquire global mutex
  	m.globalMutex.Lock()
  	defer m.globalMutex.Unlock()
  
  	// return error if closing
  	if m.closing {
  		return false, ErrClosing
  	}
  
  	// allow all if there are no credentials
  	if m.Credentials == nil {
  		return true, nil
  	}
  
  	// check login
  	if pw, ok := m.Credentials[user]; ok && pw == password {
  		return true, nil
  	}
  
  	return false, nil
  }
docs: // Authenticate will authenticates a clients credentials.