So really, you want to distinct functions: the ability to take a visitor's details and place them in a database for marketing and/or a regular mailing list, plus a means for visitors to access restricted areas, see their account data, use a forum, etc.
If you look at sites such as Hot Scripts (often a good source and one that provides ratings) and other PHP libraries, you will find a wide choice of free and premium off-the-shelf scripts that handle each of those functions. Most of them are provided with some degree of installation/configuration advice. Then you only need to create the HTML side of things, including the forms. Depending on the intended function, some scripts even include HTML files as well, though that can be counter-productive if they do not suit your needs.
A word of warning: you need to be certain that whatever scripts you use are fully secure before you open up your site to things like database writing and password access. Those are the kinds of functions in which any security flaws will be discovered and abused sooner or later. You will also need to make sure that the PHP on your server is secure, which is something with which your host can assist. That bit is fairly simple.