Login loop in Ubuntu 16.04

Options
fm394
fm394 Posts: 1

Hello,

I have SSH access to a virtual machine with Ubuntu 16.04 deployed in a server in my LAN, and I installed Teamviewer on it so that I can access it from anywhere.
When I connect to it through Teamviewer I can see the login page, but when I insert the password a system program problem is detected, the screen turns black for a couple of seconds and then I'm redirected back to the login page.
This is the content of the xsession-errors file:

openConnection: connect: No such file or directory
cannot connect to brltty at :0
upstart: gnome-session (Unity) main process (1793) terminated with status 1
upstart: Disconnected from notified D-Bus bus
upstart: logrotate main process (1617) killed by TERM signal
upstart: unicast-local-avahi main process (1678) killed by TERM signal
upstart: update-notifier-crash (/var/crash/_opt_teamviewer_tv_bin_TeamViewer_Desktop.0.crash) main process (1681) killed by TERM signal
upstart: bamfdaemon main process (1727) killed by TERM signal
upstart: hud main process (1762) killed by TERM signal
upstart: unity-panel-service main process (1812) killed by TERM signal
upstart: indicator-bluetooth main process (1841) killed by TERM signal
upstart: indicator-power main process (1842) killed by TERM signal
upstart: indicator-datetime main process (1846) killed by TERM signal
upstart: indicator-printers main process (1853) killed by TERM signal
upstart: indicator-session main process (1854) killed by TERM signal
upstart: indicator-application main process (1907) killed by TERM signal

 What's the problem? How can I fix it?

Thanks