Securing Single page web apps