fixed login bug, and added authentication validation