Please test with error_reporting set to E_ALL!
Classnames and function names aren't first-class objects in PHP and need to be referenced as strings here. :(
Added EmailAuthenticationPlugin
Added ReverseUsernameAuthenticationPlugin
Changed the StartChangePassword and EndChangePassword events to take a user, instead of a nickname
User::allowed_nickname was declared non-static, but used as if it was static, so I made the declaration static