add loginWithBlock method