replaced xml with json in sessions_controller.rb