Used respond_to and respond_with in User controller. Added flash
messages to user index