added custom user manager
refactored api controller