added loading state for log in