added security options for authentication entry point

__Tasks:__

- [x] gather feedback for my changes

__Informations:__

| Q             | A
| ------------- | ---
| Tests pass?   | yes
| Fixed tickets | none
| BC Breaks     | AJAX and API calls return 401 instead of 302, if the session expired
| Doc           | none