The example in the Lock reference docs highlight specific functionality so if you want something more relevant for a complete application you should follow the quickstart more relevant to your technology stack; I’m linking to the jQuery one as it’s the most general, but there may be one more relevant to your case.
If you follow the quickstart you’ll also notice that although there’s a sample for using Lock embedded directly in the client application the recommended approach is actually to leverage the hosted login page instead. The recommendation would be for you to follow a quickstart if what you’re looking for is a more complete sample of the integration.
As an additional note, in the more example section the snippet of Lock is using the code
response type so the actual authentication response should be processed by the back-end of a regular web application and in this case the authenticated
event of Lock does not apply as that is meant for flows used by SPA’s and not the code flow used for regular web applications.