cleanup, added optional login configuration