extracted login handler interface