actually fixed login checking