register user id to global when online