fixed security and done validation on login