More work simplifying and login handling.