Use the following queryThere is a mistake in your SOQL to fetch role name and profile name from user object using REST API. Use the following query:
SELECT Profile.Name, UserRole.Name, Id, Name FROM User;
You are getting invalid_grant: authentication failure
so you probably need to include your API security token with the password.