It's not tremendously difficult or even all that complicated anymore. There is
a lot of stuff built into the PHP language now that both simplifies things quite a bit and makes doing security right* easier than doing it wrong. But we're going to need a lot more information to be of much help.
Like -- okay, your users can log in. That part is twenty-ish simple lines of code that's hard to get wrong. So what? What does logging in
mean in your case? Are you restricting access to parts of your site (members only)? Are there various levels of permissions (moderators, main content authors, editors/publishers, admins, that sort of thing)? Are there user profiles, "friends", and so forth? Should people be able to stay logged in over time?
Partially logged in? ("I know who you claim to be, so here's your version of the site, but I won't trust you for
important stuff this session until you give me your password again.")
No, we don't need the full spec. Just enough to give you something useful for you to build on, to get you pointed in the right direction. There's not much sense in handing you a tire and saying "you ought to be able to build a car out of that".
__________________________________
* Whenever you are dealing with logins involving usernames and passwords, especially if there's an email address involved, you have voluntarily become one of the Guardians of the Keys. It's not just about protecting your site. Most people use the same password (or couple of passwords) everywhere on the web, so you've just become responsible for protecting their Facebook page, PayPal and Amazon accounts, medical records... the whole kit and kaboodle. I hope that sounds scary enough. Because we don't have access to HTTPS on Free Hosting, we can't get
everything right (individual users will still be vulnerable if someone can "sniff" their network traffic), but we can make it very, very hard for anybody to grab and crack all of our user info in one shot. By far, the vast majority of the tutorials, etc., out there on the web make life easy for crackers.