Updated login stuff to work with Chat