Fixed local login handler