added user authentication to spa, improved web api usability