Some login changes, other cleanup