Let's recap what we have implemented at this point. We have a multi-language LoginFormComponent ready for use (developed in Chapter 3, Implementing Server-Side Components with Internationalization), a UI implementation that shows a PublicComponent or a PrivateComponent, depending on whether a user is authenticated, and an AuthService class that allows us to authenticate a user (if their login credentials are correct) and check whether there is an authenticated user in the session or not.
It's time to complete the login/logout process by implementing the PublicComponent and PrivateComponent classes. Let's start with the PublicComponent class:
public class PublicComponent extends Composite { public PublicComponent() ...