Implemented login dialog