doing login validation