Implemented get user profile function.