implemented basic auth without the double click bug