Update core.js

Logout user for enrol account and reset password.