Replace 'login' link by 'logout' link if logged in, add "flash" notices

Signed-off-by: JWhy <jwhy@jwhy.de>