fixed login bug with strlen check