added key event for login