code: public void login(final String userId, final String password, final BooleanCallback callback) {
  		if (this.userId == null) {
  			loginUser(userId, password, callback);
  		} else if (this.userId.equals(userId)) {
  			// Already logged in...
  			return;
  		} else {
  			GwtCommand command = new GwtCommand(logoutCommandName);
  			GwtCommandDispatcher.getInstance().execute(command, new AbstractCommandCallback<SuccessCommandResponse>() {
  
  				public void execute(SuccessCommandResponse response) {
  					if (response.isSuccess()) {
  						userToken = null;
  						Authentication.this.userId = null;
  						manager.fireEvent(new LogoutSuccessEvent());
  						loginUser(userId, password, callback);
  					} else {
  						manager.fireEvent(new LogoutFailureEvent());
  					}
  				}
  			});
  		}
  	}
docs: Execute a login attempt, given a user name and password. If a user has already logged in, a logout will be called
  first.
  
  @param userId
  The unique user ID.
  @param password
  The user's password.
  @param callback
  A possible callback to be executed when the login has been done (successfully or not). Can be null.