a few bugfixes. Fixed Promices
client auth mocks