fixed base64 problem with small buffers
simplified test code
new authentication process validation added
better authorization structure