added a get user profile test and fixed corresponding bugs
fixed test