working login dialog