use symfony router to generate urls for login form actions.
prevent fatal errors if symfony is not available.
code style.