Logout message js fix