fixed login authentication bug