Added basic authentication to web api controller
fixed couple js errors