Fix login, also fix #21