fixed tests and added a refresh_token method as well as a method to validate a token