Bug fixes and UserController