Service autoconnect, DB fixes

First check if database is connected before trying to connect.
Autologin in Kali with new token login.