Fix where non-simple ids would not be accepted

This fix correctly trims the prefix of the id so that it is in the
correct format to be used with authenticating the user.