login is ugly but works