Fixed some bugs

Login as constructor will fail...