Fixes flash messages in the login and logout screen

Signed-off-by: Kushal Das <kushaldas@gmail.com>