Issue #2396013 by wesleydv: Code to destroy local user session is wrong
Issue #2387463 by msound: hook_user_insert exiting prematurely