1. A method for managing authentication for widgets in a web browser, comprising: displaying a plurality of widgets in the web browser; sending an HTTP request for data to a web site, wherein the HTTP request is sent via an XMLHttpRequest API; receiving from the web site a 401 HTTP status code associated with a custom “WWW-Authenticate” header value indicating that the HTTP request is unauthorized for communication with the web site; detecting the custom “WWW-Authenticate” header value; and displaying in a first widget of the plurality of widgets a text field for entering user credentials.