Authentication finished, debugged and created sample document. Also login now shows correct style of alerts.
Looked into template rendering.