fixed problem with --login option