Sort of got a login dialog working

#400