refactored user and usermanager