Lots of fixes to various things, working login, ping seems to be broken