adding attempt method to create a token from credentials