fixed some problems with login