fixed login errors and submit on key code