fixed login crash if user inputs wrong login or password