code: func (auth *Auth) Login(query *models.LoginUserQuery) error {
  	// connect to ldap server
  	if err := auth.Dial(); err != nil {
  		return err
  	}
  	defer auth.conn.Close()
  
  	// perform initial authentication
  	if err := auth.initialBind(query.Username, query.Password); err != nil {
  		return err
  	}
  
  	// find user entry & attributes
  	user, err := auth.searchForUser(query.Username)
  	if err != nil {
  		return err
  	}
  
  	auth.log.Debug("Ldap User found", "info", spew.Sdump(user))
  
  	// check if a second user bind is needed
  	if auth.requireSecondBind {
  		err = auth.secondBind(user, query.Password)
  		if err != nil {
  			return err
  		}
  	}
  
  	grafanaUser, err := auth.GetGrafanaUserFor(query.ReqContext, user)
  	if err != nil {
  		return err
  	}
  
  	query.User = grafanaUser
  	return nil
  }
docs: // Login logs in the user