Removed logged in check from profile id param as it is already checked in the project id param.
Improved test coverage for the profile API.