Fixed web UI redirection.

 - use HTTP status code 302.
 - set Access-Control-Allow-Origin and Access-Control-Allow-Methods HTTP
   headers appropriately.