Setup token based authentication

- New users will automatically get a token
- There is now an endpoint to make AJAX requests to login

JIRA: SPB-48
Won't the uncaught exception cause the test to fail?