slight designchanges, added some functions in UserController.php