fix contact list refresh button for search
fix possible null pointer on login
general code clean up