Added a user manager
Fixed bugs