You can search in the appstore, there are several login widgets. If you enhance you security level (project, security, security level) to production you will get the default login function.
You need to enable anonymous access to your application and set different navigation start pages to the anonymous and authenticated user roles. The authentivated user should have your application home page defined as start page; the anonymous user should just have access to a single page used as its start page. This page should contain the login widget and any additional workflow you need for lost passwords, or to create a new user record.