Refractoring users_controller and graphs_controller and reports_controller