Moved (and improved) ShowLoginDialog method