code: public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException,
                      IOException, InterruptedException {
          login(username, password, config.getResource());
      }
docs: Same as {@link #login(CharSequence, String, Resourcepart)}, but takes the resource from the connection
  configuration.
  
  @param username
  @param password
  @throws XMPPException
  @throws SmackException
  @throws IOException
  @throws InterruptedException
  @see #login