use coroutine to support ad-hoc callback in login button so that when the username/password is incorrect it will retry automatically currently tested with COPS on apache This should fix #1001.