add getUserId method to AuthController. Reformat code.