Sort of got a login dialog working