changed @ResponseBody to ResponseEntity to add flexibiliy of using
header manipulation.
added support for reading profile from file.