finished and updated basic auth client handling, fixes, improvements