Improved basic authentication