fixed a bug in login dialog