private Environment env;
@Override
public void buttonClick(ClickEvent event) {
SecurityContextHolder.clearContext();
BannerView banner = (BannerView) event.getComponent().getParent();
String contextPath = VaadinServlet.getCurrent().getServletContext().getContextPath();
String urlMapping = env.getProperty("vaadin.servlet.urlMapping");
String uiPath = urlMapping.substring(0, urlMapping.length() - 2);
String location = contextPath.concat(uiPath);
banner.getUI().getPage().setLocation(location);
}