update LoginActivity and auto sync