generate token when user register