Singly authentication for single page apps