Problem with UriFragmentUtility component

Hi, guys
I have so problem, in my test application I have added component for managing history in the browser. Look at the source code:

@SuppressWarnings("serial")
public class LaypanelApplication extends Application implements FragmentChangedListener {
	final public UriFragmentUtility urifu=new UriFragmentUtility();
	private LoginPage loginPage=null;
	private MainAppPage mainAppPage=null;

	@Override
	public void init() {		
		setApp();
		setLocale(new Locale("ru", "RU"));
		setTheme("laypaneltheme");		
	}	
	private void setApp(){
		setMainWindow(new Window("VAADIN Test App"));
		getMainWindow().setStyleName("v-window-main");

		getMainWindow().addComponent(urifu);
		urifu.addListener(this);
		urifu.setFragment(URIs.loginURI);			
	}
	private MainAppPage getAppWindow(){
		if (mainAppPage==null)
			mainAppPage=new MainAppPage(this);		
		return mainAppPage;		
	}	
	private LoginPage getLoginPage(){
		if (loginPage==null)
			loginPage=new LoginPage(this);		
		return loginPage;
	}
	public void fragmentChanged(FragmentChangedEvent source) {
		String fragment=source.getUriFragmentUtility().getFragment();
		if (fragment!=null){
			if (fragment==URIs.mainURI)
				getMainWindow().setContent(getAppWindow());										
			if (fragment==URIs.loginURI)
				getMainWindow().setContent(getLoginPage());										
		}		
	}
}

An event in application is works fine and it changes setContent according with program logic but uri is stays same, didn’t add #login or #main parts and not works back button in the browser. Can anybody explain where is error in my code.

Note that the UriFU which manages the URI changes is removed from the main window when you call the setContent() in the fragmentChanged() method.

This sort of issues should get better in Vaadin 7 where the URIs are no longer handled with a component.