Implemented ModelAttribute instead of PathVariable to get userid