Bug #440: No Element Found

Code Review: http://mrccodereview.cloudapp.net/ui#review:id=1265

The problem is that in FireFox all JSON responses must be JSON. In this case, GetProfile API returns "" which is strictly speaking not JSON. The fix is to return an empty User object when the profile is not set and maintain the logic to return null if the JSON is empty.

Changed also the HTTP error from BAD REQUEST to UNAUTHORIZED which is more suitable.