updated code to support JDK1.6 and access token in userservice.