EN auth: moved authentication logic into the backend

This allows to remove quite a bit of duplicated logic.
EN auth: minor docstring update
EN auth: cleaned up URL pattern names
EN auth: aligned function name semantics and added docstrings