Create userDetail service and give control to user to set user object and its authorities
Please review