code: func (ftp *FTP) Login(username string, password string) (err error) {
  	if _, err = ftp.cmd("331", "USER %s", username); err != nil {
  		if strings.HasPrefix(err.Error(), "230") {
  			// Ok, probably anonymous server
  			// but login was fine, so return no error
  			err = nil
  		} else {
  			return
  		}
  	}
  
  	if _, err = ftp.cmd("230", "PASS %s", password); err != nil {
  		return
  	}
  
  	return
  }
docs: /*
  
  
  // login on server with strange login behavior
  func (ftp *FTP) SmartLogin(username string, password string) (err error) {
  	var code int
  	// Maybe the server has some useless words to say. Make him talk
  	code, _ = ftp.RawCmd("NOOP")
  
  	if code == 220 || code == 530 {
  		// Maybe with another Noop the server will ask us to login?
  		code, _ = ftp.RawCmd("NOOP")
  		if code == 530 {
  			// ok, let's login
  			code, _ = ftp.RawCmd("USER %s", username)
  			code, _ = ftp.RawCmd("NOOP")
  			if code == 331 {
  				// user accepted, password required
  				code, _ = ftp.RawCmd("PASS %s", password)
  				code, _ = ftp.RawCmd("PASS %s", password)
  				if code == 230 {
  					code, _ = ftp.RawCmd("NOOP")
  					return
  				}
  			}
  		}
  
  	}
  	// Nothing strange... let's try a normal login
  	return ftp.Login(username, password)
  }
  
  */
  // Login to the server with provided username and password.
  // Typical default may be ("anonymous","").