added basic_http_auth function and @basic_http_auth decorator to index function