Fixing onUserAfterLogin and onUserAfterLogout