fix wrong view behavior when username in token is empty