How to perform Custom User Authentication and Authorization

You want to make a custom auth system like u&p still this is not properly documented