more tests, and bugfix in refresh token method