Improve index, add logout
Fix connection issues