login working synchronously