fix logged flash message for User class without username field