Added nl2br for markdown markup in case extension is not available
Added access check for login/register