UserController fixes

Changed architecture of controller , now it's more encapsulated. Added
"register", "all" functions.