A framework gives you standard solutions to typical problems, e.g. for an online shop that can cover the functionality for a customer login (including session handling), a shopping cart, placing orders...
The big advantage of using a framework is that
You don't need to reinvent the wheel, the code is already there
The code (usually) works, it is already tested
Specifically for user authentication, you will most probably have fewer security leaks as if you invented something from scratch yourself
The big disadvantage is that
If you want to extend the functionality, you have to understand OPC (other peoples code)
If the framework contains a security hole and an exploit is available, your site is immediately vulnerable, but you may not have the knowledge to fix it yourself. So you need to keep a constant lookout on security bulletins, updates, fixes etc.