[Fixes #530]: Flash messages disappear after unsuccessful login attempt