bug fixes in getUserProfileData in views.py