added session authentication to view api in browser