Added code to the user contoller and views