fixed bugs on login...