MiniBB has just two files for authorization/logging procedure:
- bb_func_login.php - contains the code to handle the login routine itself, i.e. when a user submits the "Login" button after entering Username/Password on the main page, or internal thread pages. Most of the routine could be caught in setup_options.php or bb_specials.php, if you have something significantly different. In other cases, it's better to leave this file by default, then it will be easier in upgrades. But it's up to you.
- bb_cookie.php - the set of functions, which read the authorization cookie, parse its value and consider, if user is logged or not.
Most possibly you should take a look in both of files. Hope you know what to do next.